#ifndef DRWIDGETLEFT_H
#define DRWIDGETLEFT_H

#include <QWidget>
#include <QListWidgetItem>
#include "DRListItem.h"
#include "DRListItemGroup.h"
#include "DRDef.h"

namespace Ui {
class DRWidgetLeft;
}

class DRWidgetLeft : public QWidget
{
    Q_OBJECT

public:
    explicit DRWidgetLeft(QWidget *parent = 0);
    ~DRWidgetLeft();

signals:
    void onSearchGroup(QString);
    void onSearchRecord(QString);
    void onDeleteGroup(int);
    void onDeleteRecord(int);
    void onAddRecord(int groupIndex);

public slots:
    void searchGroup(QString text, int index);
    void searchRecord(DRItemType item1);
    void addRecord(DRItemType item1);
    void searchTextChange(QString text);

private slots:
    void addButtonClicked();

private:
    Ui::DRWidgetLeft *ui;
    DRListItem *pitem;

    int panleIndex;
    int currentGroup;
};

#endif // DRWIDGETLEFT_H
